<%@ include file="../include.jsp" %>

<tiles:insertDefinition name="component.layout.SubPanel">
   <tiles:putAttribute name="title" value="Your Connections" />
   <tiles:putAttribute name="content">

<c:forEach var="providerId" items="${providerIds}">
   <c:set var="connections" value="${connectionMap[providerId]}" />
   <fmt:message var="providerDisplayName" key="social.${providerId}.name" />
   <div class="accountConnection">
      <h4>${providerDisplayName}</h4>
      <p>
      
      <c:if test="${not empty connections}">
         <a href="<c:url value="/account/settings/connect/${providerId}.html" />"><img src="<c:url value="${imagesDir}" />/social/${providerId}/f_logo.jpg" width="36" height="36" /></a>
         You are connected as ${connections[0].displayName}.
      </c:if>
      <c:if test="${empty connections}">
         <form action="<c:url value="/account/settings/connect/facebook.html" />" method="POST">
            <input type="hidden" name="scope" value="email,user_birthday,publish_stream,offline_access" />
            <button type="submit"><img src="<c:url value="${imagesDir}" />/social/facebook/connect_light_medium_short.gif" /></button>
         </form>
      </c:if>
      </p>
   </div>
</c:forEach>

</tiles:putAttribute>
</tiles:insertDefinition>
